package com.cloud.mall.sms.service;

import com.cloud.mall.base.BaseResponse;
import com.cloud.mall.sms.dto.SmsCouponParam;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

@Api(tags = "优惠券管理接口")
@RequestMapping("/coupon")
public interface SmsCouponService {

    @ApiOperation("添加优惠券")
    @PostMapping("/create")
    BaseResponse create(@RequestBody SmsCouponParam smsCouponParam);

    @ApiOperation("修改优惠券")
    @PostMapping("/update/{id}")
    BaseResponse update(@PathVariable Long id,
                        @RequestBody SmsCouponParam smsCouponParam);

    @ApiOperation("删除优惠券")
    @PostMapping("/delete/{id}")
    BaseResponse delete(@PathVariable Long id);

    @ApiOperation("获取单个优惠券的详细信息")
    @GetMapping("/{id}")
    BaseResponse<SmsCouponParam> getItem(@PathVariable Long id);

  /*  @ApiOperation("根据优惠券名称和类型分页获取优惠券列表")
    @GetMapping("/list")
    BaseResponse<CommonPage<SmsCoupon>> list(
            @RequestParam(value = "name",required = false) String name,
            @RequestParam(value = "type",required = false) Integer type,
            @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
            @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum);*/

}
